<?php 
	function display_user_tags($username){
		$search = "SELECT tag FROM UserTags WHERE username='$username'";
		$result = mysql_query($search);
		echo "<div class='e' id='e'>Users Tags:<br>";
		while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
			echo "<div class='e' id='smalle'>";
			echo "<a href='edit_tag.php?index=1&tag=".$row['tag']."' style=color:#806D7E>".$row['tag']."</a>";
			echo "</div>";
			echo "<div class='e' id='smalle'>";
			echo "<a href='manage_users/delete_user_tag.php?link=".$row['tag']."&un=".$username."' style=color:#806D7E>delete</a><br>";
			echo "</div>";
		}
		echo "</div>";
		$search = "SELECT DISTINCT(tag) FROM Tags;";
		$result = mysql_query($search);
		echo "<div class='e' id='e'>Available Tags:<br>";
		while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
			echo "<div class='e' id='smalle'>";
			echo "<a href='edit_tag.php?index=1&tag=".$row['tag']."'style=color:#806D7E>".$row['tag']."</a>";
			echo "</div>";
			echo "<div class='e' id='smalle'>";
			echo " <a href='manage_users/add_user_tag.php?link=".$row['tag']."&un=".$username."'style=color:#806D7E>add to user</a><br>";
			echo "</div>";
		}
		echo "</div>";
	}
;?>